package com.wyzz.hr.action;

import com.wyzz.hr.base.wf.leaverequest.LrWfApproverAction;
import com.wyzz.hr.pojo.Leaverequest;
import com.wyzz.hr.vo.ExaminSearchBean;
import com.wyzz.hr.vo.LeaveFormBean;

public class EmpLeaveUpdAction extends LrWfApproverAction {

	public EmpLeaveUpdAction() {
	}

	public String executeInit() throws Exception {
		if (lf_Bean == null)
			lf_Bean = new LeaveFormBean();
		lr = initLfBean("update", lf_Bean, lrUpdateId);
		if (lr == null)
			return "error";
		else
			return "success";
	}

	public String execute() throws Exception {
		String operate = "update";
		String info = super.authorityCondition;
		if ("ALL".equals(info))
			operate = "gm-update";
		if ("HR".equals(info))
			operate = "hr-update";
		if ("SUB".equals(info))
			operate = "mgr-update";
		return wfObjOpSingle(operate, lf_Bean, lrUpdateId);
	}

	public LeaveFormBean getLf_Bean() {
		return lf_Bean;
	}

	public void setLf_Bean(LeaveFormBean lf_Bean) {
		this.lf_Bean = lf_Bean;
	}

	public String getLrUpdateId() {
		return lrUpdateId;
	}

	public void setLrUpdateId(String lrUpdateId) {
		this.lrUpdateId = lrUpdateId;
	}

	public String getSrcAction() {
		return srcAction;
	}

	public void setSrcAction(String srcAction) {
		this.srcAction = srcAction;
	}

	public ExaminSearchBean getEs_Bean() {
		return es_Bean;
	}

	public void setEs_Bean(ExaminSearchBean es_Bean) {
		this.es_Bean = es_Bean;
	}

	public Leaverequest getLr() {
		return lr;
	}

	public void setLr(Leaverequest lr) {
		this.lr = lr;
	}

	private static final long serialVersionUID = 1L;
	private LeaveFormBean lf_Bean;
	private Leaverequest lr;
	private String lrUpdateId;
	private String srcAction;
	private ExaminSearchBean es_Bean;
}
